package com.imooc.study.imoocstudy.common;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;

import java.util.List;

/**
 * 扩展通用mapper
 * @param <T>
 */
@RegisterMapper
public interface TestCommonMapper<T>  {

    /**
     * 查询测试
     */
    @SelectProvider(type = TestCommonMapperProvider.class, method = "dynamicSQL")
    List<T> selectTestGet();

    /**
     * 新增测试
     */
    @InsertProvider(type = TestCommonMapperProvider.class, method = "dynamicSQL")
    int insertTestGet(T entity);

}
